package common

import (
	"github.com/gin-gonic/gin"
	"honghu_be/model"
)

func WriteError(c *gin.Context, err error) {
	c.JSON(
		200,
		model.CommonResponse{
			Meta: model.Meta{
				Code: ErrCode,
				Msg:  err.Error(),
			},
		},
	)
	c.Abort()
}
